<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2019/8/16
  Time: 11:11
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <base href="${pageContext.request.contextPath}/">
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>购物车</title>
    <link rel="stylesheet" href="css/bootstrapcss/bootstrap.css">
    <link rel="stylesheet" href="css/front/header.css">
    <link rel="stylesheet" href="css/front/reset.css">
    <link rel="stylesheet" href="css/front/carts.css">
    <script src="js/front-js/mzp-packed.js"></script>
    <script src="js/jquery-2.2.4.js"></script>
    <script src="js/bootstrap.js"></script>
</head>
<body>

<div class="container">
    <div class="row">
        <div class="clearfix">
            <div class="col-md-10 col-md-offset-1">
                <jsp:include page="header.jsp"></jsp:include>
<div class="cart-top">
    <div style="padding-left: 20px;padding-top: 25px">
        您的位置：
        <a href="#">首页</a> > <a href="#">我的淘宝</a> > 我的购物车
    </div>
    <div style="margin-left: 1250px">
        ${sessionScope.loginUser.loginName}
    </div>
</div>
            </div>
        </div>
    </div>
</div>

<section class="cartMain">
    <div class="cartMain_hd">
        <ul class="order_lists cartTop">
            <li class="list_chk">
                <!--所有商品全选-->
                <input type="checkbox" id="all" class="whole_check">
                <label for="all"></label>
                全选
            </li>
            <li class="list_con">商品信息</li>
            <li class="list_info">商品参数</li>
            <li class="list_price">单价</li>
            <li class="list_amount">数量</li>
            <li class="list_sum">金额</li>
            <li class="list_op">操作</li>
        </ul>
    </div>

    <%--每个购物车详情--%>
    <c:forEach var="item" items="${sessionScope.cart.values()}">
    <div class="cartBox">
        <%--显示店铺--%>
        <div class="shop_info">
            <div class="all_check">
                <!--店铺全选-->
                <input type="checkbox" id="shop_a" class="shopChoice">
                <label for="shop_a" class="shop"></label>
            </div>
            <div class="shop_name">
                店铺：<a href="javascript:;">${item.product.guimeiUsers}</a>
            </div>
        </div>
            <%--显示商品--%>
        <div class="order_content">
            <ul class="order_lists">
                <li class="list_chk">
                    <input type="checkbox" id="checkbox_2" class="son_check">
                    <label for="checkbox_2"></label>
                </li>
                <li class="list_con">
                    <div class="list_img"><a href="javascript:;"><img src="${item.product.image}" alt=""></a></div>
                    <div class="list_text"><a href="javascript:;">${item.product.descr}</a></div>
                </li>
                <li class="list_info">
                    <p>${item.product.type}</p>
                </li>
                <li class="list_price">
                    <p class="price">￥${item.product.price}</p>
                </li>
                <li class="list_amount">
                    <div class="amount_box">
                        <a href="javascript:;" class="reduce reSty">-</a>
                        <input type="text" value="1" class="sum" style="width: 40px;height: 25px">
                        <a href="javascript:;" class="plus">+</a>
                    </div>
                </li>
                <li class="list_sum">
                    <p class="sum_price">￥${item.product.price * item.quantity}</p>
                </li>
                <li class="list_op">
                    <p class="del"><a href="javascript:;" class="delBtn">移除商品</a></p>
                </li>
            </ul>
        </div>
            <%--显示商品end--%>
    </div>
    </c:forEach>
    <!--底部-->
    <div class="bar-wrapper">
        <div class="bar-right">
            <div class="piece">已选商品<strong class="piece_num">0</strong>件</div>
            <div class="totalMoney">共计: ￥<strong class="total_text">0.00</strong></div>
            <div class="calBtn"><a href="javascript:jiesuan()">结算</a></div>
        </div>
    </div>
</section>
<section class="model_bg"></section>
<section class="my_model">
    <p class="title">删除宝贝<span class="closeModel">X</span></p>
    <p>您确认要删除该宝贝吗？</p>
    <div class="opBtn"><a href="javascript:;" class="dialog-sure">确定</a><a href="javascript:;" class="dialog-close">关闭</a></div>
</section>
<script src="js/front-js/carts.js"></script>
</body>
</html>